
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/BriefTestProgressListener.h> 
#include <cppunit/TestResult.h>
#include <cppunit/XmlOutputter.h> 

#include <string>
#include <iostream>


using std::cout;
using std::endl;

int main(int argc,char *argv[])
{
	cout<<"start..."<<endl;

	CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();

	CppUnit::TextTestRunner runner;

	//Test util
	runner.addTest( suite->findTest("StringUtilTest"));


	runner.addTest( suite->findTest("UtilTest"));
	runner.addTest( suite->findTest("MsnContactTest"));
	runner.addTest( suite->findTest("ContactManagerTest"));
	runner.addTest( suite->findTest("SessionManagerTest"));
	runner.addTest( suite->findTest("MsnSessionTest"));


	runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
		std::cerr) );

	CppUnit::BriefTestProgressListener listener;
	runner.eventManager().addListener(&listener);
	
	return runner.run();

}
